home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Mac Power 1997 December
/
MACPOWER-1997-12.ISO.7z
/
MACPOWER-1997-12.ISO
/
AMUG
/
PROGRAMMING
/
Raven 1.2 Examples.sit
/
Raven 1.2 Examples
/
BoxPaint
/
Source
/
App.cpp
next >
Wrap
Text File
|
1997-04-13
|
3KB
|
124 lines
/*
* File: App.cpp
* Summary: Application object.
* Written by: Jesse Jones
*
* Copyright ゥ 1996-1997 Jesse Jones. All Rights Reserved.
*
* Change History (most recent first):
*
* <2> 4/12/97 JDJ Doesn't call PRECONDITION in dtor.
* <1> 5/25/96 JDJ Created
*/
#include "App.h"
#include <ZDialogUtils.h>
#include <ZMiscUtils.h>
#include <ZRegularDesktop.h>
#include <ZWindow.h>
#include "Doc.h"
// ===================================================================================
// class CApplication
// ===================================================================================
//---------------------------------------------------------------
//
// CApplication::~CApplication
//
//---------------------------------------------------------------
CApplication::~CApplication()
{
}
//---------------------------------------------------------------
//
// CApplication::CApplication
//
//---------------------------------------------------------------
CApplication::CApplication()
{
mNumFileTypes = 1;
mFileTypes[0] = 'PICT';
// POSTCONDITION(true); // wait till HandleInit is called (by Run)
}
#pragma mark ハ
//---------------------------------------------------------------
//
// CApplication::OnAboutBox
//
//---------------------------------------------------------------
void CApplication::OnAboutBox()
{
(void) DoAlert(256);
}
//---------------------------------------------------------------
//
// CApplication::OnCreateDoc
//
//---------------------------------------------------------------
TDocument* CApplication::OnCreateDoc()
{
CDocument* doc = new CDocument(this);
// Documents are reference counted and are created with their
// ref count being zero. TDocWindow dtor decrements its document's
// reference count. If there are no other references to the
// document the document is deleted.
(void) TWindow::Create(256, doc);
return doc;
}
//---------------------------------------------------------------
//
// CApplication::OnOpenWithoutDoc
//
//---------------------------------------------------------------
void CApplication::OnOpenWithoutDoc()
{
this->HandleOpen();
}
//---------------------------------------------------------------
//
// CApplication::OnMenuCommand
//
//---------------------------------------------------------------
bool CApplication::OnMenuCommand(const MenuCommand& command)
{
bool handled = false;
handled = Inherited::OnMenuCommand(command);
return handled;
}
//---------------------------------------------------------------
//
// CApplication::OnCommandStatus
//
//---------------------------------------------------------------
bool CApplication::OnCommandStatus(const MenuCommand& command, SCommandStatus& status)
{
bool handled = false;
handled = Inherited::OnCommandStatus(command, status);
return handled;
}